﻿using NP.BPMReportPlatform.AuthorizationProcessesManager.Dtos;
using NP.BPMReportPlatform.Entities.BPM_Process;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace NP.BPMReportPlatform.AuthorizationProcessesManager
{
    /// <summary>
    /// 流程权限管理
    /// </summary>
    public interface IAuthorizationProcessesAppService : IApplicationService
    {

        /// <summary>
        /// 获取用户单个流程权限
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<bool> GetSingleProcessPermission(GetUserAuthorizationProcessesInput input);

        /// <summary>
        /// 获取用户流程权限
        /// </summary>
        /// <param name="EmployeeCode"></param>
        /// <returns></returns>
        Task<List<string>> GetUserAuthorizationProcesses(string EmployeeCode);

        ///// <summary>
        ///// 获取用户流程权限
        ///// </summary>
        ///// <param name="input"></param>
        ///// <returns></returns>
        //Task<List<GetUserAuthorizationProcessesOutput>> GetUserAuthorizationProcesses(GetUserAuthorizationProcessesInput input);


        /// <summary>
        /// 获取微信用户
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<GetWechatUserOutput> GetWechatUser(GetWechatUserInput input);

        /// <summary>
        /// 获取流程信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<ProcessInfoOutput>> GetProcessList(ProcessInfoInput input);
        /// <summary>
        /// 导出流程信息
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<List<ProcessInfoOutput>> ExportProcessList(ProcessInfoInput input);
        /// <summary>
        /// 编辑流程
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<string> EditProcessAsync(EditProcessInput input);

        /// <summary>
        /// 查询流程发起权限
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<PagedResultDto<AuthorizationProcessesSettingsDto>> GetAuthorizationProcessAsync(GetAuthorizationProcessesSettingsInput input);

        /// <summary>
        /// 新增流程发起权限配置
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task AddAuthorizationProcessAsync(AuthorizationProcessesSettings input);

        /// <summary>
        /// 编辑流程发起权限配置
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task EditAuthorizationProcessAsync(AuthorizationProcessesSettings input);

        /// <summary>
        /// 删除流程发起权限配置
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task DeleteAuthorizationProcessAsync(Guid id);

        /// <summary>
        /// 验证是否维护了负责人信息
        /// </summary>
        /// <param name="ProcessId"></param>
        /// <returns></returns>
        Task<bool> CheckResponsible(Guid ProcessId);

        /// <summary>
        /// 老BPM根据用户工号获取授权流程ID列表
        /// </summary>
        /// <returns></returns>
        Task<List<GetUserProcessAuthForOldBPMOutput>> GetUserAuthProcessId(string WorkNumber);
    }
}
